<!doctype html>
<html>
<head>
    <!--Setting-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta name="apple-mobile-web-app-capable"  content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no,email=no">
    
    
    <!--Simple SEO-->


<meta name="robots" content=all />
<meta name="google" content=all />
<meta name="googlebot" content=all />
<meta name="verify" content=all />
    <!--Title-->

<title>docker_remote_API | MIAbon&#39;s blog</title>

<link rel="alternate" href="/atom.xml" title="MIAbon&#39;s blog" type="application/atom+xml">


<link rel="icon" href="/favicon.ico">

    
<link rel="stylesheet" href="/css/base.css">
<link rel="stylesheet" href="/css/pages/post.css">
<link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/css/thirdParty/highlight/github.css">
<link rel="stylesheet" href="/.css">

    <!--script-->


<script src="http://cdn1.lncld.net/static/js/3.2.1/av-min.js"></script>
<script>
  var appId = "i7AHmC7NPbPtgS3YxT67dRIc-9Nh9j0Va";
  var appKey = "g6TKbY8O4TsCDMcemoC3STvQ";
  var region = "";
  AV.init({
    appId: appId,
    appKey: appKey,
    region: region
  });
</script>


<script async src="//dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

<!--<script src="https://imsun.github.io/gitment/dist/gitment.browser.js"></script>-->


    
    
</head>

<body id="normal">
<!--[if lte IE 8]>
<style>
    html{ font-size: 1em }
</style>
<![endif]-->
<!--[if lte IE 9]>
<style>
    header{ top: 71px; position: absolute!important;}
    #container{padding-top: 151px!important;}
</style>
<div style="position:fixed;z-index:9999;left:0;top:0;width:100%;height:70px;background-color:#e0e0e0;color:#396CA5;border-bottom:1px solid #cecece;text-align:center;line-height:70px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis">你使用的浏览器版本过低，为了你更好的阅读体验，请更新浏览器的版本或者使用其他现代浏览器，比如Chrome、Firefox、Safari等。</div>
<![endif]-->

<div id="wrap">
    <header  style="position: absolute;" >
    <div id="site-meta">
        <a href="/" id="logo">
            <h1 class="title">MIAbon&#39;s blog</h1>
        </a>
        
    </div>
    <ul id="nav">
        
            <li><a href="/"><i class="fa fa-home"></i>首页</a></li>
        
            <li><a href="/atom.xml"><i class="fa fa-rss"></i>RSS</a></li>
        
        <li id="search"><a href="javascript:void(0)"><i class="fa fa-search"></i>搜索</a></li>
    </ul>
</header>

    <div id="container">
        
<ul id="sidebar">
    
    
    
    
<li class="widget widget-normal category">
    <h3 class="fa fa-th widget-title">分类</h3>
    <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/ELK/"><i class="fa" aria-hidden="true">ELK</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/Lvs/"><i class="fa" aria-hidden="true">Lvs</i></a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/admin/"><i class="fa" aria-hidden="true">admin</i></a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/ansible/"><i class="fa" aria-hidden="true">ansible</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/aws/"><i class="fa" aria-hidden="true">aws</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/docker/"><i class="fa" aria-hidden="true">docker</i></a><span class="category-list-count">7</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/drone/"><i class="fa" aria-hidden="true">drone</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/kernel/"><i class="fa" aria-hidden="true">kernel</i></a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/kubernetes/"><i class="fa" aria-hidden="true">kubernetes</i></a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/kvm/"><i class="fa" aria-hidden="true">kvm</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mongodb/"><i class="fa" aria-hidden="true">mongodb</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link current" href="/categories/python/"><i class="fa" aria-hidden="true">python</i></a><span class="category-list-count">9</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/share/"><i class="fa" aria-hidden="true">share</i></a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/web/"><i class="fa" aria-hidden="true">web</i></a><span class="category-list-count">12</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/zabbix/"><i class="fa" aria-hidden="true">zabbix</i></a><span class="category-list-count">3</span></li></ul>
</li>


    
    
<li class="widget widget-normal archive">
  <h3 class="fa fa-archive widget-title">归档</h3>
    <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/02/"><i class="fa" aria-hidden="true">二月 2018</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2018/01/"><i class="fa" aria-hidden="true">一月 2018</i></a><span class="archive-list-count">8</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/12/"><i class="fa" aria-hidden="true">十二月 2017</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/11/"><i class="fa" aria-hidden="true">十一月 2017</i></a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/10/"><i class="fa" aria-hidden="true">十月 2017</i></a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/09/"><i class="fa" aria-hidden="true">九月 2017</i></a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/08/"><i class="fa" aria-hidden="true">八月 2017</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/05/"><i class="fa" aria-hidden="true">五月 2017</i></a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/04/"><i class="fa" aria-hidden="true">四月 2017</i></a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/03/"><i class="fa" aria-hidden="true">三月 2017</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2017/01/"><i class="fa" aria-hidden="true">一月 2017</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/12/"><i class="fa" aria-hidden="true">十二月 2016</i></a><span class="archive-list-count">1</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/11/"><i class="fa" aria-hidden="true">十一月 2016</i></a><span class="archive-list-count">3</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/10/"><i class="fa" aria-hidden="true">十月 2016</i></a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/08/"><i class="fa" aria-hidden="true">八月 2016</i></a><span class="archive-list-count">2</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/05/"><i class="fa" aria-hidden="true">五月 2016</i></a><span class="archive-list-count">4</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/04/"><i class="fa" aria-hidden="true">四月 2016</i></a><span class="archive-list-count">8</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/"><i class="fa" aria-hidden="true">五月 2015</i></a><span class="archive-list-count">1</span></li></ul>
</li>


    
    
<li class="widget widget-normal tags">
  <h3 class="fa fa-tags widget-title">标签云</h3>
  <div class="tagcloud-content">
    
      <a href="/tags/drone/" style="font-size: 0.14rem; color: #69c">drone</a> <a href="/tags/linux/" style="font-size: 0.2rem; color: #0a407c">linux</a> <a href="/tags/kernel/" style="font-size: 0.16rem; color: #4f83b8">kernel</a> <a href="/tags/ELK/" style="font-size: 0.14rem; color: #69c">ELK</a> <a href="/tags/ansible/" style="font-size: 0.14rem; color: #69c">ansible</a> <a href="/tags/swarm/" style="font-size: 0.14rem; color: #69c">swarm</a> <a href="/tags/docker/" style="font-size: 0.18rem; color: #215690">docker</a> <a href="/tags/firewalld/" style="font-size: 0.14rem; color: #69c">firewalld</a> <a href="/tags/zabbix/" style="font-size: 0.16rem; color: #4f83b8">zabbix</a> <a href="/tags/aws/" style="font-size: 0.14rem; color: #69c">aws</a> <a href="/tags/web/" style="font-size: 0.16rem; color: #4f83b8">web</a> <a href="/tags/python/" style="font-size: 0.18rem; color: #215690">python</a> <a href="/tags/spider/" style="font-size: 0.17rem; color: #386da4">spider</a>
  </div>
</li>


    
    
<li class="widget widget-normal friends-link">
    <h3 class="fa fa-globe widget-title">友链</h3><br/>

    
        <a href="http://zhengwei666.wang" class="fa" target="_blank">zhengwei</a>

    
        <a href="https://you-deng.github.io" class="fa" target="_blank">dengyou</a>

    
        <a href="http://www.systemd.cn" class="fa" target="_blank">langyaoliang</a>

    
        <a href="http://www.chen-hao.com.cn/" class="fa" target="_blank">chenhao</a>

    
        <a href="http://www.yulongjun.com" class="fa" target="_blank">yulongjun</a>

    

</li>

    
</ul>


        <div id="main">
    <article id="post">
        <div id="post-header">

            <h1 id="docker_remote_API">
                
                docker_remote_API
                
            </h1>
            <div class="article-meta">
    
    
    <span class="categories-meta fa-wrap">
            <i class="fa fa-folder-open-o"></i>
        <span>docker</span>
    </span>
    
    
    <span class="fa-wrap">
         <i class="fa fa-tags"></i>
        <span class="tags-meta">
            
            linux
            
        </span>
    </span>
    
    
    <span class="fa-wrap">
        <i class="fa fa-clock-o"></i>
        <span class="date-meta ">2017/09/01</span>
    </span>
    
    
    <span class="fa-wrap">
            <i class="fa fa-thermometer-three-quarters"></i>
        <span class="hits hits-meta " data-leadcloud-title="docker_remote_API"
              data-leadcloud-url="/2017/09/01/Docker_Remore_API的使用范例/"><i class="fa fa-spinner fa-spin"></i></span>
    </span>
    
    
</div>

            
            
        </div>
        
        <div id="post-body">
            <p>测试机docker IP:192.168.174.250<br>内核启动的时候默认打开这三个I/O设备文件：标准输入文件stdin，标准输出文件stdout，标准错误输出文件stderr，分别得到文件描述符 0, 1, 2。   </p>
<h1 id="docker-server是否存活"><a href="#docker-server是否存活" class="headerlink" title="docker server是否存活"></a>docker server是否存活</h1><p>curl -s -XGET ‘http:// 192.168.174.250:2375 /_ping’   </p>
<figure class="highlight"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">OK</div></pre></td></tr></table></figure>
<h1 id="显示docker版本信息"><a href="#显示docker版本信息" class="headerlink" title="显示docker版本信息"></a>显示docker版本信息</h1><p>curl -s -XGET ‘http:// 192.168.174.250:2375 /version’ | jq .</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div></pre></td><td class="code"><pre><div class="line">&#123;</div><div class="line">  <span class="attr">"Version"</span>: <span class="string">"17.06.1-ce"</span>,</div><div class="line">  <span class="attr">"ApiVersion"</span>: <span class="string">"1.30"</span>,</div><div class="line">  <span class="attr">"MinAPIVersion"</span>: <span class="string">"1.12"</span>,</div><div class="line">  <span class="attr">"GitCommit"</span>: <span class="string">"874a737"</span>,</div><div class="line">  <span class="attr">"GoVersion"</span>: <span class="string">"go1.8.3"</span>,</div><div class="line">  <span class="attr">"Os"</span>: <span class="string">"linux"</span>,</div><div class="line">  <span class="attr">"Arch"</span>: <span class="string">"amd64"</span>,</div><div class="line">  <span class="attr">"KernelVersion"</span>: <span class="string">"4.4.86-1.el7.elrepo.x86_64"</span>,</div><div class="line">  <span class="attr">"BuildTime"</span>: <span class="string">"2017-08-17T23:01:50.155177940+00:00"</span></div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h1 id="显示系统信息"><a href="#显示系统信息" class="headerlink" title="显示系统信息"></a>显示系统信息</h1><p>curl -s -XGET ‘http:// 192.168.174.250:2375 /info’|jq .</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div><div class="line">60</div><div class="line">61</div><div class="line">62</div><div class="line">63</div><div class="line">64</div><div class="line">65</div><div class="line">66</div><div class="line">67</div><div class="line">68</div><div class="line">69</div><div class="line">70</div><div class="line">71</div><div class="line">72</div><div class="line">73</div><div class="line">74</div><div class="line">75</div><div class="line">76</div><div class="line">77</div><div class="line">78</div><div class="line">79</div><div class="line">80</div><div class="line">81</div><div class="line">82</div><div class="line">83</div><div class="line">84</div><div class="line">85</div><div class="line">86</div><div class="line">87</div><div class="line">88</div><div class="line">89</div><div class="line">90</div><div class="line">91</div><div class="line">92</div><div class="line">93</div><div class="line">94</div><div class="line">95</div><div class="line">96</div><div class="line">97</div><div class="line">98</div><div class="line">99</div><div class="line">100</div><div class="line">101</div><div class="line">102</div><div class="line">103</div><div class="line">104</div><div class="line">105</div><div class="line">106</div><div class="line">107</div><div class="line">108</div><div class="line">109</div><div class="line">110</div><div class="line">111</div><div class="line">112</div><div class="line">113</div><div class="line">114</div><div class="line">115</div><div class="line">116</div><div class="line">117</div><div class="line">118</div><div class="line">119</div><div class="line">120</div><div class="line">121</div><div class="line">122</div><div class="line">123</div><div class="line">124</div><div class="line">125</div><div class="line">126</div><div class="line">127</div><div class="line">128</div><div class="line">129</div><div class="line">130</div><div class="line">131</div><div class="line">132</div><div class="line">133</div><div class="line">134</div><div class="line">135</div><div class="line">136</div><div class="line">137</div><div class="line">138</div><div class="line">139</div><div class="line">140</div><div class="line">141</div><div class="line">142</div><div class="line">143</div><div class="line">144</div><div class="line">145</div><div class="line">146</div><div class="line">147</div><div class="line">148</div><div class="line">149</div><div class="line">150</div><div class="line">151</div><div class="line">152</div><div class="line">153</div><div class="line">154</div><div class="line">155</div><div class="line">156</div><div class="line">157</div><div class="line">158</div><div class="line">159</div><div class="line">160</div><div class="line">161</div><div class="line">162</div><div class="line">163</div><div class="line">164</div><div class="line">165</div><div class="line">166</div><div class="line">167</div><div class="line">168</div><div class="line">169</div><div class="line">170</div><div class="line">171</div><div class="line">172</div><div class="line">173</div><div class="line">174</div><div class="line">175</div><div class="line">176</div><div class="line">177</div><div class="line">178</div><div class="line">179</div><div class="line">180</div><div class="line">181</div><div class="line">182</div><div class="line">183</div><div class="line">184</div><div class="line">185</div><div class="line">186</div><div class="line">187</div><div class="line">188</div><div class="line">189</div><div class="line">190</div><div class="line">191</div><div class="line">192</div><div class="line">193</div><div class="line">194</div><div class="line">195</div><div class="line">196</div><div class="line">197</div><div class="line">198</div><div class="line">199</div><div class="line">200</div><div class="line">201</div><div class="line">202</div><div class="line">203</div><div class="line">204</div><div class="line">205</div><div class="line">206</div><div class="line">207</div><div class="line">208</div><div class="line">209</div><div class="line">210</div><div class="line">211</div><div class="line">212</div><div class="line">213</div><div class="line">214</div><div class="line">215</div><div class="line">216</div><div class="line">217</div><div class="line">218</div><div class="line">219</div><div class="line">220</div><div class="line">221</div><div class="line">222</div><div class="line">223</div><div class="line">224</div><div class="line">225</div><div class="line">226</div><div class="line">227</div><div class="line">228</div><div class="line">229</div><div class="line">230</div><div class="line">231</div><div class="line">232</div><div class="line">233</div><div class="line">234</div><div class="line">235</div><div class="line">236</div><div class="line">237</div><div class="line">238</div><div class="line">239</div><div class="line">240</div><div class="line">241</div><div class="line">242</div><div class="line">243</div><div class="line">244</div><div class="line">245</div><div class="line">246</div><div class="line">247</div><div class="line">248</div><div class="line">249</div><div class="line">250</div><div class="line">251</div><div class="line">252</div><div class="line">253</div><div class="line">254</div><div class="line">255</div><div class="line">256</div><div class="line">257</div><div class="line">258</div><div class="line">259</div><div class="line">260</div><div class="line">261</div><div class="line">262</div><div class="line">263</div><div class="line">264</div><div class="line">265</div><div class="line">266</div><div class="line">267</div><div class="line">268</div><div class="line">269</div></pre></td><td class="code"><pre><div class="line">&#123;</div><div class="line">  <span class="attr">"ID"</span>: <span class="string">"5OOL:V4NS:PVNR:FOXU:QEFL:S2LR:RJ3S:GYSJ:VABM:4O3S:UIKW:FMT2"</span>,</div><div class="line">  <span class="attr">"Containers"</span>: <span class="number">2</span>,</div><div class="line">  <span class="attr">"ContainersRunning"</span>: <span class="number">1</span>,</div><div class="line">  <span class="attr">"ContainersPaused"</span>: <span class="number">0</span>,</div><div class="line">  <span class="attr">"ContainersStopped"</span>: <span class="number">1</span>,</div><div class="line">  <span class="attr">"Images"</span>: <span class="number">107</span>,</div><div class="line">  <span class="attr">"Driver"</span>: <span class="string">"overlay2"</span>,</div><div class="line">  <span class="attr">"DriverStatus"</span>: [</div><div class="line">    [</div><div class="line">      <span class="string">"Backing Filesystem"</span>,</div><div class="line">      <span class="string">"xfs"</span></div><div class="line">    ],</div><div class="line">    [</div><div class="line">      <span class="string">"Supports d_type"</span>,</div><div class="line">      <span class="string">"true"</span></div><div class="line">    ],</div><div class="line">    [</div><div class="line">      <span class="string">"Native Overlay Diff"</span>,</div><div class="line">      <span class="string">"true"</span></div><div class="line">    ]</div><div class="line">  ],</div><div class="line">  <span class="attr">"SystemStatus"</span>: <span class="literal">null</span>,</div><div class="line">  <span class="attr">"Plugins"</span>: &#123;</div><div class="line">    <span class="attr">"Volume"</span>: [</div><div class="line">      <span class="string">"local"</span></div><div class="line">    ],</div><div class="line">    <span class="attr">"Network"</span>: [</div><div class="line">      <span class="string">"bridge"</span>,</div><div class="line">      <span class="string">"host"</span>,</div><div class="line">      <span class="string">"macvlan"</span>,</div><div class="line">      <span class="string">"null"</span>,</div><div class="line">      <span class="string">"overlay"</span></div><div class="line">    ],</div><div class="line">    <span class="attr">"Authorization"</span>: <span class="literal">null</span>,</div><div class="line">    <span class="attr">"Log"</span>: [</div><div class="line">      <span class="string">"awslogs"</span>,</div><div class="line">      <span class="string">"fluentd"</span>,</div><div class="line">      <span class="string">"gcplogs"</span>,</div><div class="line">      <span class="string">"gelf"</span>,</div><div class="line">      <span class="string">"journald"</span>,</div><div class="line">      <span class="string">"json-file"</span>,</div><div class="line">      <span class="string">"logentries"</span>,</div><div class="line">      <span class="string">"splunk"</span>,</div><div class="line">      <span class="string">"syslog"</span></div><div class="line">    ]</div><div class="line">  &#125;,</div><div class="line">  <span class="attr">"MemoryLimit"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"SwapLimit"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"KernelMemory"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"CpuCfsPeriod"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"CpuCfsQuota"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"CPUShares"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"CPUSet"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"IPv4Forwarding"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"BridgeNfIptables"</span>: <span class="literal">false</span>,</div><div class="line">  <span class="attr">"BridgeNfIp6tables"</span>: <span class="literal">false</span>,</div><div class="line">  <span class="attr">"Debug"</span>: <span class="literal">false</span>,</div><div class="line">  <span class="attr">"NFd"</span>: <span class="number">23</span>,</div><div class="line">  <span class="attr">"OomKillDisable"</span>: <span class="literal">true</span>,</div><div class="line">  <span class="attr">"NGoroutines"</span>: <span class="number">31</span>,</div><div class="line">  <span class="attr">"SystemTime"</span>: <span class="string">"2017-09-08T20:37:27.348424133+08:00"</span>,</div><div class="line">  <span class="attr">"LoggingDriver"</span>: <span class="string">"json-file"</span>,</div><div class="line">  <span class="attr">"CgroupDriver"</span>: <span class="string">"cgroupfs"</span>,</div><div class="line">  <span class="attr">"NEventsListener"</span>: <span class="number">0</span>,</div><div class="line">  <span class="attr">"KernelVersion"</span>: <span class="string">"4.4.86-1.el7.elrepo.x86_64"</span>,</div><div class="line">  <span class="attr">"OperatingSystem"</span>: <span class="string">"CentOS Linux 7 (Core)"</span>,</div><div class="line">  <span class="attr">"OSType"</span>: <span class="string">"linux"</span>,</div><div class="line">  <span class="attr">"Architecture"</span>: <span class="string">"x86_64"</span>,</div><div class="line">  <span class="attr">"IndexServerAddress"</span>: <span class="string">"https://index.docker.io/v1/"</span>,</div><div class="line">  <span class="attr">"RegistryConfig"</span>: &#123;</div><div class="line">    <span class="attr">"AllowNondistributableArtifactsCIDRs"</span>: [],</div><div class="line">    <span class="attr">"AllowNondistributableArtifactsHostnames"</span>: [],</div><div class="line">    <span class="attr">"InsecureRegistryCIDRs"</span>: [</div><div class="line">      <span class="string">"127.0.0.0/8"</span></div><div class="line">    ],</div><div class="line">    <span class="attr">"IndexConfigs"</span>: &#123;</div><div class="line">      <span class="attr">"docker.io"</span>: &#123;</div><div class="line">        <span class="attr">"Name"</span>: <span class="string">"docker.io"</span>,</div><div class="line">        <span class="attr">"Mirrors"</span>: [</div><div class="line">          <span class="string">"https://2vyzm5vg.mirror.aliyuncs.com/"</span></div><div class="line">        ],</div><div class="line">        <span class="attr">"Secure"</span>: <span class="literal">true</span>,</div><div class="line">        <span class="attr">"Official"</span>: <span class="literal">true</span></div><div class="line">      &#125;</div><div class="line">    &#125;,</div><div class="line">    <span class="attr">"Mirrors"</span>: [</div><div class="line">      <span class="string">"https://2vyzm5vg.mirror.aliyuncs.com/"</span></div><div class="line">    ]</div><div class="line">  &#125;,</div><div class="line">  <span class="attr">"NCPU"</span>: <span class="number">1</span>,</div><div class="line">  <span class="attr">"MemTotal"</span>: <span class="number">2088816640</span>,</div><div class="line">  <span class="attr">"DockerRootDir"</span>: <span class="string">"/data"</span>,</div><div class="line">  <span class="attr">"HttpProxy"</span>: <span class="string">""</span>,</div><div class="line">  <span class="attr">"HttpsProxy"</span>: <span class="string">""</span>,</div><div class="line">  <span class="attr">"NoProxy"</span>: <span class="string">""</span>,</div><div class="line">  <span class="attr">"Name"</span>: <span class="string">"docker.miabon.com"</span>,</div><div class="line">  <span class="attr">"Labels"</span>: <span class="literal">null</span>,</div><div class="line">  <span class="attr">"ExperimentalBuild"</span>: <span class="literal">false</span>,</div><div class="line">  <span class="attr">"ServerVersion"</span>: <span class="string">"17.06.1-ce"</span>,</div><div class="line">  <span class="attr">"ClusterStore"</span>: <span class="string">""</span>,</div><div class="line">  <span class="attr">"ClusterAdvertise"</span>: <span class="string">""</span>,</div><div class="line">  <span class="attr">"Runtimes"</span>: &#123;</div><div class="line">    <span class="attr">"runc"</span>: &#123;</div><div class="line">      <span class="attr">"path"</span>: <span class="string">"docker-runc"</span></div><div class="line">    &#125;</div><div class="line">  &#125;,</div><div class="line">  <span class="attr">"DefaultRuntime"</span>: <span class="string">"runc"</span>,</div><div class="line">  <span class="attr">"Swarm"</span>: &#123;</div><div class="line">    <span class="attr">"NodeID"</span>: <span class="string">""</span>,</div><div class="line">    <span class="attr">"NodeAddr"</span>: <span class="string">""</span>,</div><div class="line">    <span class="attr">"LocalNodeState"</span>: <span class="string">"inactive"</span>,</div><div class="line">    <span class="attr">"ControlAvailable"</span>: <span class="literal">false</span>,</div><div class="line">    <span class="attr">"Error"</span>: <span class="string">""</span>,</div><div class="line">    <span class="attr">"RemoteManagers"</span>: <span class="literal">null</span></div><div class="line">  &#125;,</div><div class="line">  <span class="attr">"LiveRestoreEnabled"</span>: <span class="literal">false</span>,</div><div class="line">  <span class="attr">"Isolation"</span>: <span class="string">""</span>,</div><div class="line">  <span class="attr">"InitBinary"</span>: <span class="string">"docker-init"</span>,</div><div class="line">  <span class="attr">"ContainerdCommit"</span>: &#123;</div><div class="line">    <span class="attr">"ID"</span>: <span class="string">"6e23458c129b551d5c9871e5174f6b1b7f6d1170"</span>,</div><div class="line">    <span class="attr">"Expected"</span>: <span class="string">"6e23458c129b551d5c9871e5174f6b1b7f6d1170"</span></div><div class="line">  &#125;,</div><div class="line">  <span class="attr">"RuncCommit"</span>: &#123;</div><div class="line">    <span class="attr">"ID"</span>: <span class="string">"810190ceaa507aa2727d7ae6f4790c76ec150bd2"</span>,</div><div class="line">    <span class="attr">"Expected"</span>: <span class="string">"810190ceaa507aa2727d7ae6f4790c76ec150bd2"</span></div><div class="line">  &#125;,</div><div class="line">  <span class="attr">"InitCommit"</span>: &#123;</div><div class="line">    <span class="attr">"ID"</span>: <span class="string">"949e6fa"</span>,</div><div class="line">    <span class="attr">"Expected"</span>: <span class="string">"949e6fa"</span></div><div class="line">  &#125;,</div><div class="line">  <span class="attr">"SecurityOptions"</span>: [</div><div class="line">    <span class="string">"name=seccomp,profile=default"</span></div><div class="line">  ]</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h1 id="系统"><a href="#系统" class="headerlink" title="系统"></a>系统</h1><h2 id="显示数据使用信息"><a href="#显示数据使用信息" class="headerlink" title="显示数据使用信息"></a>显示数据使用信息</h2><p>显示镜像，容器信息   </p>
<h1 id="containers"><a href="#containers" class="headerlink" title="containers"></a>containers</h1><h2 id="列出容器"><a href="#列出容器" class="headerlink" title="列出容器"></a>列出容器</h2><p>GET    /containers/json<br>参数<br>    all：1表示真， 显示所有的容器 ，默认显示只在运行的容器<br>    limit：限制返回数量<br>    size：显示容器的大小    返回SizeRw和SizeRootFs<br>    filters： 在容器列表 进行 过滤 处理，编码为JSON（map [string] [] string））。<br>        例如，{“status”：[“paused”]}只会返回已暂停的容器。 可用过滤器：<br>        ancestor=(<image-name>[:<tag>], <image id="">, or <a href="&#x6d;&#97;&#105;&#108;&#116;&#x6f;&#58;&#105;&#109;&#x61;&#x67;&#x65;&#64;&#x64;&#x69;&#103;&#101;&#x73;&#116;">&#105;&#109;&#x61;&#x67;&#x65;&#64;&#x64;&#x69;&#103;&#101;&#x73;&#116;</a>)<br>        before=(<container id=""> or <container name="">)<br>        expose=(<port>[/<proto>]|<startport-endport>/[<proto>])<br>        exited=<int> containers with exit code of <int><br>        health=(starting|healthy|unhealthy|none)<br>        id=<id> a container’s ID<br>        isolation=(default|process|hyperv) (Windows daemon only)<br>        is-task=(true|false)<br>        label=key or label=”key=value” of a container label<br>        name=<name> a container’s name<br>        network=(<network id=""> or <network name="">)<br>        publish=(<port>[/<proto>]|<startport-endport>/[<proto>])<br>        since=(<container id=""> or <container name="">)<br>        status=(created|restarting|running|removing|paused|exited|dead)<br>        volume=(<volume name=""> or <mount point="" destination="">)   </mount></volume></container></container></proto></startport-endport></proto></port></network></network></name></id></int></int></proto></startport-endport></proto></port></container></container></image></tag></image-name></p>
<p>curl -s -XGET ‘<a href="http://192.168.174.250:2375/containers/json?all=1&#39;|" target="_blank" rel="external">http://192.168.174.250:2375/containers/json?all=1&#39;|</a> jq .<br>curl -s -XGET ‘<a href="http://192.168.174.250:2375/containers/json?all=1\&amp;limit=1" target="_blank" rel="external">http://192.168.174.250:2375/containers/json?all=1\&amp;limit=1</a> ‘| jq .<br>curl -s -XGET ‘<a href="http://192.168.174.250:2375/containers/json?all=1\&amp;filters={&quot;status" target="_blank" rel="external">http://192.168.174.250:2375/containers/json?all=1\&amp;filters={&quot;status</a>“: [“exited”]} ‘| jq .   </p>
<h2 id="检查容器"><a href="#检查容器" class="headerlink" title="检查容器"></a>检查容器</h2><p>GET    /containers/(container id)/json<br>curl -s -XGET ‘<a href="http://192.168.174.250:2375/containers/" target="_blank" rel="external">http://192.168.174.250:2375/containers/</a> 1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350 /json’| jq .   </p>
<h2 id="创建容器"><a href="#创建容器" class="headerlink" title="创建容器"></a>创建容器</h2><p>POST /containers/create<br>    参数<br>    config：容器的配置文件<br>    或者使用json格式的POST数据<br>    Hostname 用作容器的主机名<br>    Domainname  用作容器的域名<br>    User 容器内部运行命令的用户名<br>    AttachStdin 是否附加到stdin，默认为false<br>    AttachStdout 是否附加到stdout，默认为true<br>    AttachStderr 是否附加到stderr，默认为true<br>    ExposedPorts 将端口映射到容器外 {“<port>/<tcp|udp>“: {}}<br>    Tty 将标准流输出到TTY，如果没有关闭，则包含stdin。默认为false<br>    OpenStdin 默认为false<br>    StdinOnce 当一个客户端关闭连接后关闭stdin，默认为false<br>    Env 以[“KEY = value”，…]的形式在容器内设置的环境变量表。 一个变量如果没有 = 就从环境中删除，而不能是一个空值。<br>    Cmd 运行字符串或字符串组的命令。<br>    Healthchech 检查容器是否健康的。<br>    ArgEscaped 命令转义（仅限windows）<br>    Image 创建容器的时候要使用的镜像的名称<br>    Volumes 容器卷的映射路径<br>    WorkingDir 运行命令的工作目录<br>    Entrypoint 容器的字符串或字符串数组的输入点。如果数组由一个空字符串（[“”]组成），则输入点将重置为系统默认值（即Dockerfile中没有ENTRYPOINT指令时由docker使用的         输入点）。<br>    NetworkDisabled 关闭容器网络<br>    OnBuild 在镜像的Dockerfile种定义ONBUILD的元数据<br>    Labels 用户定义的key/value元数据<br>    StopSignal  停止 容器的信号 字符串或无符号整数。<br>    StopTimeout 超时后在几秒内停止容器<br>    Shell<br>    HostConfig 正在运行docker主机的容器配置<br>    NetworkingConfig 容器网络配置<br><figure class="highlight"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div></pre></td><td class="code"><pre><div class="line">curl -XPOST -H "Content-Type: application/json"  http:// 192.168.174.250:2375 /containers/create -d '&#123;   </div><div class="line">     "Hostname":"",   </div><div class="line">     "User":"",   </div><div class="line">     "Memory":0,   </div><div class="line">     "MemorySwap":0,   </div><div class="line">     "AttachStdin":false,   </div><div class="line">     "AttachStdout":true,   </div><div class="line">     "AttachStderr":true,   </div><div class="line">     "PortSpecs":null,   </div><div class="line">     "Privileged": false,   </div><div class="line">     "Tty":false,   </div><div class="line">     "OpenStdin":false,   </div><div class="line">     "StdinOnce":false,   </div><div class="line">     "Env":null,   </div><div class="line">     "Dns":null,   </div><div class="line">     "Image":"vieux/elasticsearch",   </div><div class="line">     "Volumes":&#123;&#125;,   </div><div class="line">     "VolumesFrom":"",   </div><div class="line">     "WorkingDir":""   </div><div class="line">&#125;'</div></pre></td></tr></table></figure></tcp|udp></port></p>
<h2 id="列出正在运行的容器里面的进程"><a href="#列出正在运行的容器里面的进程" class="headerlink" title="列出正在运行的容器里面的进程"></a>列出正在运行的容器里面的进程</h2><p>GET    /containers/{id}/top</p>
<p>参数<br>    ps_args：传递给ps的参数，例如使用aux参数   </p>
<p>curl -s -XGET ‘ <a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/top" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/top</a>‘ | jq  .   </p>
<h2 id="获取一个容器的日志"><a href="#获取一个容器的日志" class="headerlink" title="获取一个容器的日志"></a>获取一个容器的日志</h2><p>GET    /containers/{id}/logs</p>
<p>参数<br>    follow：1代表真，0代表假，返回stream流日志，默认是false<br>    stdout：1代表真，0代表假，如果logs=true，则返回stdout log，默认是 false<br>    stderr：1代表真，0代表假，如果logs=true，则返回stderr log，默认是 false<br>    timestamps：1代表真，0代表假，如果logs=true，则在每一行日志前打印一个timestamps，默认是 false<br>curl -s -XGET ‘ <a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/logs?stdout=1&amp;follow=1&amp;timestamps=1" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/logs?stdout=1&amp;follow=1&amp;timestamps=1</a>‘</p>
<h2 id="查看一个容器的改变"><a href="#查看一个容器的改变" class="headerlink" title="查看一个容器的改变"></a>查看一个容器的改变</h2><p>GET    /containers/{id}/changes   </p>
<p>curl -s -XGET ‘ <a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/changes" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/changes</a>‘   </p>
<h2 id="导出一个容器为tar包"><a href="#导出一个容器为tar包" class="headerlink" title="导出一个容器为tar包"></a>导出一个容器为tar包</h2><p>GET    /containers/{id}/export   </p>
<p>curl -s -XGET ‘ <a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/export" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/export</a>‘   </p>
<h2 id="容器的状态"><a href="#容器的状态" class="headerlink" title="容器的状态"></a>容器的状态</h2><p>GET    /containers/{id}/stats   </p>
<p>参数<br>    stream：1代表镇，0代表假，默认是ture   </p>
<p>curl -s -XGET ‘ <a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/stats" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/stats</a>‘   </p>
<h2 id="调整容器的TTY"><a href="#调整容器的TTY" class="headerlink" title="调整容器的TTY"></a>调整容器的TTY</h2><p>POST    /containers/{id}/resize   </p>
<h2 id="启动一个容器"><a href="#启动一个容器" class="headerlink" title="启动一个容器"></a>启动一个容器</h2><p>POST    /containers/{id}/start   </p>
<h2 id="停止一个容器"><a href="#停止一个容器" class="headerlink" title="停止一个容器"></a>停止一个容器</h2><p>POST /containers/{id}/stop<br>参数<br>    t：等待多少秒后停止容器</p>
<h2 id="重启一个容器"><a href="#重启一个容器" class="headerlink" title="重启一个容器"></a>重启一个容器</h2><p>POST /containers/{id}/restart<br>参数<br>    t：等待多少秒后重启容器</p>
<h2 id="kill一个容器"><a href="#kill一个容器" class="headerlink" title="kill一个容器"></a>kill一个容器</h2><p>发送一个POSIX信号到一个容器，默认是杀死容器。<br>POST     /containers/{id}/kill<br>参数<br>   signal： 以整数或字符串形式发送到容器的信号（如SIGINT），默认是SIGKILL</p>
<h2 id="更改容器的配置选项"><a href="#更改容器的配置选项" class="headerlink" title="更改容器的配置选项"></a>更改容器的配置选项</h2><p>POST /containers/{id}/update   </p>
<p>参数<br>    CpuShares：相对于其他容器CPU的权重<br>    Memory：内存限制，默认是0<br>    CgroupParent：创建容器时Cgroup路径，如果不是绝对路径，则认为这个路径是相对于init进程的cgroup路径。如果不存在则创建Cgroup<br>    BlkioWeight：block io权重（相对权重）<br>    BlkioWeightDevice： 以[{“Path”：“device_path”，“Weight”：weight}]的形式设置IO权重（相对设备权重）。<br>    BlkioDeviceReadBps： 以[{“Path”：“device_path”，“Rate”：rate}]的形式限制设备的读取速率（每秒字节数）。<br>     BlkioDeviceWriteBps：以[{“Path”：“device_path”，“Rate”：rate}]的形式限制设备的写入速率（每秒字节数）。<br>     BlkioDeviceReadIOps：以[{“Path”：“device_path”，“Rate”：rate}]的形式限制设备的读取速率（每秒IO））。<br>     BlkioDeviceWriteOps：以[{“Path”：“device_path”，“Rate”：rate}]的形式限制设备的写入速率（每秒IO））。<br>    CpuPeriod：CPU周期（以微秒为单位）。<br>    CpuQuota：在CPU时钟周期内容器可以获得的CPU时间（微秒）<br>    CpuRealtimePeriod：CPU实时周期（以微秒为单位），设置为0，不分配任何时间给实时任务。<br>    CpuRealtimeRuntime：CPU实时运行时间长度 （以微秒为单位），设置为0，不分配任何时间给实时任务。<br>    CpusetCpus：允许执行的CPU（例如，0-3,0.1）<br>    CpusetMems：允许执行的存储器节点（MEM）（0-3,0.1）。 仅在NUMA系统上有效。<br>    Devices：添加到容器的设备列表<br>    DeviceCgroupRules：要应用于容器的cgroup规则列表<br>    DiskQuota：磁盘限制（以字节为单位）。<br>    KernelMemory：内核内存限制（以字节为单位）。<br>    MemoryReservation：内存软限制字节数。<br>    MemorySwap：总内存限制（内存+交换）。 设置-1以启用无限制的交换。<br>    MemorySwappiness：调整容器的内存交换变化。 接受0到100之间的整数。<br>    NanoCPUs：CPU配额 单位为10-9个CPU。<br>    OomKillDisable：关闭容器的OOM Killer<br>    PidsLimit：调整容器的pids限制。 设为-1为无限制。<br>    Ulimits： 设置 容器中的资源限制列表。 例如：{“Name”：“nofile”，“Soft”：1024，“Hard”：2048}“<br>    CpuCount：Windows<br>    CpuPercent：Windows<br>    IOMaximumIOPs：Windows<br>    IOMaximumBandwidth：Windows<br>    RestartPolicy：容器退出时应用的行为。 默认是不重新启动。<br>    在每次重新启动之前都会添加不断增加的延迟（先前延迟的两倍，从100ms开始），以防止阻塞服务器。   </p>
<h2 id="重命名一个容器"><a href="#重命名一个容器" class="headerlink" title="重命名一个容器"></a>重命名一个容器</h2><p>POST /containers/{id}/rename</p>
<p>参数<br>    name： 给容器的新名字<br>    curl -XPOST -H “Content-Type: application/x-www-form-urlencoded” -d “name=value” <a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/rename" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/rename</a><br>    curl -XPOST <a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/rename?name=value" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/rename?name=value</a></p>
<h2 id="暂停一个容器"><a href="#暂停一个容器" class="headerlink" title="暂停一个容器"></a>暂停一个容器</h2><p>POST /containers/{id}/pause</p>
<p>使用cgroups freezer暂停容器中的所有进程。<br>传统上，当暂停一个进程时，使用SIGSTOP信号，这个进程可以被暂停。 使用cgroups freezer，该进程不知道，无法捕获它被暂停，并随后恢复。   </p>
<h2 id="恢复一个容器"><a href="#恢复一个容器" class="headerlink" title="恢复一个容器"></a>恢复一个容器</h2><p>POST /containers/{id}/unpause   </p>
<p>恢复一个被暂停的容器   </p>
<h2 id="进入一个容器"><a href="#进入一个容器" class="headerlink" title="进入一个容器"></a>进入一个容器</h2><p>POST /containers/{id}/attach<br>参数<br>    logs：1代表真，0代表假，返回logs，默认是false<br>    stream：1代表真，0代表假，返回stream，默认是false<br>    stdin：1代表真，0代表假，如果stream=true，则attach到stdin上，默认是false<br>    stdout：1代表真，0代表假，如果logs=true，则返回stdout log，如果stream=true，则attach到stdout上，默认是false<br>    stderr：1代表真，0代表假，如果logs=true，则返回stderr log，如果stream=true，则attach到stderr上，默认是false<br>curl -XPOST ‘<a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/attach?logs=1&amp;stream=1&amp;stdout=1" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/attach?logs=1&amp;stream=1&amp;stdout=1</a>‘   </p>
<h2 id="通过websocket连接到容器"><a href="#通过websocket连接到容器" class="headerlink" title="通过websocket连接到容器"></a>通过websocket连接到容器</h2><p>GET /containers/{id}/attach/ws   </p>
<p>参数<br>    logs：返回logs，默认是false<br>    steam：返回logs，默认是false<br>    stdin：连接到stdin，默认是false<br>    stdout：连接到stdout，默认是false<br>    stderr：连接到stderr，默认是false   </p>
<h2 id="等待一个容器"><a href="#等待一个容器" class="headerlink" title="等待一个容器"></a>等待一个容器</h2><p>阻止一个容器直到容器停止，然后返回退出代码。   </p>
<p>POST /containers/{id}/wait<br>参数<br>    condition：等待容器状态达到给定条件，“not-running”（默认），“netx-exit”或者“removed”。   </p>
<h2 id="移除一个容器"><a href="#移除一个容器" class="headerlink" title="移除一个容器"></a>移除一个容器</h2><p>DELETE /containers/{id}<br>参数<br>    v：删除与容器关联的卷，默认是false<br>    force：当容器运行时强制删除容器，默认是false<br>    link：删除与容器关联的link，默认是false   </p>
<p><strong>取得一个容器内的文件信息</strong><br>HEAD /containers/{id}/archive<br>参数<br>    path：  </p>
<h2 id="获取容器中的文件系统资源的存档"><a href="#获取容器中的文件系统资源的存档" class="headerlink" title="获取容器中的文件系统资源的存档"></a>获取容器中的文件系统资源的存档</h2><p>GET /containers/{id}/archive   </p>
<p>参数<br>    path：<br>curl -XGET ‘<a href="http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/archive?path=/etc/hosts" target="_blank" rel="external">http://192.168.174.250:2375/containers/1c01730f6053847c10edeb4e78f0c6779bb1dce40b75eb6414b4c4cfbacc4350/archive?path=/etc/hosts</a>‘   </p>
<h2 id="将文件或文件夹的归档放到容器中的目录"><a href="#将文件或文件夹的归档放到容器中的目录" class="headerlink" title="将文件或文件夹的归档放到容器中的目录"></a>将文件或文件夹的归档放到容器中的目录</h2><p>PUT /containers/{id}/archive<br>参数<br>    path：<br>    noOverwriteDirNonDir：</p>
<h2 id="删除停止的容器"><a href="#删除停止的容器" class="headerlink" title="删除停止的容器"></a>删除停止的容器</h2><p>POST /containers/prune<br>参数<br>    filters：   </p>
<h1 id="镜像"><a href="#镜像" class="headerlink" title="镜像"></a>镜像</h1><h2 id="镜像列表"><a href="#镜像列表" class="headerlink" title="镜像列表"></a>镜像列表</h2><p>GET /images/json   </p>
<p>参数<br>    filters： 在容器列表 进行 过滤 处理，编码为JSON（map [string] [] string））。   </p>
<p>curl -s -XGET <a href="http://192.168.174.250:2375/images/json?all=1&amp;disgests=1" target="_blank" rel="external">http://192.168.174.250:2375/images/json?all=1&amp;disgests=1</a><br>curl -s -XGET <a href="http://192.168.174.250:2375/images/json?disgests=1&amp;filters={&quot;reference&quot;:[&quot;nginx:1.12*&quot;]}" target="_blank" rel="external">http://192.168.174.250:2375/images/json?disgests=1&amp;filters={&quot;reference&quot;:[&quot;nginx:1.12*&quot;]}</a>   </p>
<h2 id="构建一个镜像"><a href="#构建一个镜像" class="headerlink" title="构建一个镜像"></a>构建一个镜像</h2><p>使用tar存档中的Dockerfile构建映像。   </p>
<p>POST /build   </p>
<p>参数<br>    dockerfile：在构建时的Docker文件的路径。 如果指定了remote并指向外部Dockerfile，则会被忽略。<br>    t：标签格式name:tag,默认是name:latest，可以提供多个标签<br>    extrahosts：添加额外的主机到/etc/hosts<br>    remote：Git存储库URI或HTTP / HTTPS上下文URI。 如果URI指向单个文本文件，则将文件的内容放入名为Dockerfile的文件中，并从该文件构建映像。 如果URI指向tar包，该文件将由守护程序下载，其中的内容用作构建的上下文。 如果URI指向tar包，并且还指定了dockerfile参数，则必须有一个文件，其中包含tar包中的路径。<br>    q：抑制详细构建输出。<br>    nocache：构建镜像的时候不使用缓存<br>    cachefrom：从缓存的json数组中构建镜像<br>    pull：即使本地存在较旧的镜像，也尝试拉取镜像。<br>    rm：成功构建镜像后移除中间容器，默认是true。<br>    forcerm：即使发生故障，也清除中间容器。默认是false。<br>    memory：设置构建时的内存<br>    memswap：总内存（内存+交换）设置-1来禁止使用交换<br>    cpushares：CPU份额（相对权重）<br>    cpusetcpus：允许执行的CPU（例如0-3,0.1）。<br>    cpuperiod：CPU周期（以微秒为单位）。<br>    cpuquota：在CPU时钟周期内容器可以获得的CPU时间（微秒）<br>    bulidargs：<br>    shmsize：/dev/shm的大小（以字节为单位） 必须大于0.如果省略,则系统使用64MB。<br>    squash：将所得到的镜像层数压成单层。（仅限实验版本）<br>    labels：在镜像上设置的key/value标签，作为对的JSON映射的字符串。<br>    networkmode：在构建时设置运行命令的组网模式。 支持的标准值有：bridge，host，none和container：<name |="" id="">。 任何其他值将被视为此容器连接的自定义网络名称。<br>Header参数<br>    Content-Type：默认是”application/x-tar”<br>    X-Registry-Config：这是一个base64编码的JSON对象，具有针对构建可引用的多个身份验证配置。    </name></p>
<h2 id="删除构建缓存"><a href="#删除构建缓存" class="headerlink" title="删除构建缓存"></a>删除构建缓存</h2><p>POST /build/prune    </p>
<h2 id="创建一个镜像"><a href="#创建一个镜像" class="headerlink" title="创建一个镜像"></a>创建一个镜像</h2><p>从注册仓库中提取镜像或导入镜像。   </p>
<p>POST /images/create    </p>
<p>参数<br>    fromImage：要拉取镜像的名称 该名称包含标签或摘要。 此参数只能在拉取镜像时使用。 如果HTTP连接关闭，则取消。<br>    fromSrc：从源导入，该值可以是镜像的URL，或者 - 从请求主体读取镜像。 此参数只能在导入镜像时使用。   </p>
<p>   repo：<br>    tag：标签或摘要。 如果在拉取镜像时标签为空，则会导致指定镜像的所有标签。</p>
<p>Header 参数<br>    X-Registry-Auth：base64编码的验证配置。</p>
<h2 id="获取镜像的信息"><a href="#获取镜像的信息" class="headerlink" title="获取镜像的信息"></a>获取镜像的信息</h2><p>返回镜像的信息。<br>GET /images/{name}/json<br>参数<br>    name：镜像名字或者id    </p>
<h2 id="获取一个镜像的历史"><a href="#获取一个镜像的历史" class="headerlink" title="获取一个镜像的历史"></a>获取一个镜像的历史</h2><p>GET /images/{name}/history<br>参数<br>    name：镜像名称或者id    </p>
<h2 id="推送镜像"><a href="#推送镜像" class="headerlink" title="推送镜像"></a>推送镜像</h2><p>推送镜像到仓库<br>参数<br>    name：镜像名称或者id<br>    tag：与仓库上的映像关联的标签。<br>Header 参数<br>    X-Registry-Auth：base64编码的验证配置。</p>
<h2 id="标记一个镜像"><a href="#标记一个镜像" class="headerlink" title="标记一个镜像"></a>标记一个镜像</h2><p>标记一个镜像使其成为仓库的一部分<br>参数<br>    name：镜像名称或者id<br>    repo：要标记的存储库，例如someuser/someimage<br>    tag：新标签的名字   </p>
<h2 id="移除一个镜像"><a href="#移除一个镜像" class="headerlink" title="移除一个镜像"></a>移除一个镜像</h2><p>如果镜像正在被构建或者容器使用，则无法将其删除。<br>参数<br>    name：镜像名字或者ID<br>    force：强制移除，不管有没有容器在使用或者其他标签。默认false<br>    noprune：不删除未标记的上层镜像。默认false   </p>
<h2 id="搜索镜像"><a href="#搜索镜像" class="headerlink" title="搜索镜像"></a>搜索镜像</h2><p>在Docker Hub搜索镜像<br>GET /images/search<br>参数<br>    term：搜索条件<br>    limit：限制结果数量<br>    filters：<br>过滤器<br>    is-automated=(true|false)是否自动化<br>    is-official=(true|false)是否官方<br>    stars=<number> Matches images that has at least ‘number’ stars.星数<br>curl -s -XGET <a href="http://192.168.174.250:2375/images/search?term=nginx" target="_blank" rel="external">http://192.168.174.250:2375/images/search?term=nginx</a>   </number></p>
<h2 id="删除未使用的镜像"><a href="#删除未使用的镜像" class="headerlink" title="删除未使用的镜像"></a>删除未使用的镜像</h2><p>POST /images/prune   </p>
<h2 id="从容器创建新镜像"><a href="#从容器创建新镜像" class="headerlink" title="从容器创建新镜像"></a>从容器创建新镜像</h2><p>POST /commit<br>参数<br>    container：要提交容器的ID或者名字<br>    repo：创建镜像存储库的名称<br>    tag：创建镜像标签的名称<br>    comment：提交的信息<br>    author：作者署名<br>    pause：提交容器之前是否展亭容器，默认true<br>    changes：提交时要应用的Dockerfile   </p>
<h2 id="导出镜像"><a href="#导出镜像" class="headerlink" title="导出镜像"></a>导出镜像</h2><p>GET /images/{name}/get   </p>
<h2 id="导出多个图像"><a href="#导出多个图像" class="headerlink" title="导出多个图像"></a>导出多个图像</h2><p>GET /images/get   </p>
<h2 id="导入镜像s"><a href="#导入镜像s" class="headerlink" title="导入镜像s"></a>导入镜像s</h2><p>将一组镜像和标签加载到存储库中。<br>POST /images/load<br>参数<br>    quiet：静默模式，默认false   </p>
<h1 id="网络"><a href="#网络" class="headerlink" title="网络"></a>网络</h1><h2 id="网络列表"><a href="#网络列表" class="headerlink" title="网络列表"></a>网络列表</h2><p>GET /networks<br>参数<br>    filters：<br>curl -s -XGET <a href="http://192.168.174.250:2375/networks?filters={&quot;name&quot;:[&quot;bridge&quot;]}" target="_blank" rel="external">http://192.168.174.250:2375/networks?filters={&quot;name&quot;:[&quot;bridge&quot;]}</a></p>
<h2 id="网络信息"><a href="#网络信息" class="headerlink" title="网络信息"></a>网络信息</h2><p>GET /networks/{id}<br>参数<br>    id：网络ID或者名字<br>    verbose：详细检查输出用于故障排除，默认false<br>    scope：按范围过滤网络（群集，全局或本地）   </p>
<h2 id="移除网络"><a href="#移除网络" class="headerlink" title="移除网络"></a>移除网络</h2><p>DELETE /networks/{id}   </p>
<h2 id="创建网络"><a href="#创建网络" class="headerlink" title="创建网络"></a>创建网络</h2><p>POST /networks/create<br>参数<br>    Name：网络的名字<br>    CheckDuplicate：检查重复名称的网络。 由于网络主要基于随机ID而不是名称，并且网络名称严格使用ID为唯一标识的网络的用户友好别名，因此没有保证的方式来检查重复项。 CheckDuplicate是为了尽可能地检查具有相同名称的任何网络，但不能保证所有名称冲突。<br>    Driver：要使用的网络驱动程序的名称。默认bridge<br>    Internal：限制对网络的外部访问。<br>    Attachable：在集群模式容器可以附加到全局网络<br>    Ingress：在集群模式入口网络上给网络提供路由功能<br>    IPAM：<br>    EnableIPv6：<br>    Options：使用特定网络的选项。<br>    Labels：用户定义的key/value   </p>
<h2 id="将容器连入网络"><a href="#将容器连入网络" class="headerlink" title="将容器连入网络"></a>将容器连入网络</h2><p>POST /networks/{id}/connect<br>参数<br>    id：网络ID或者名称<br>    container：要连入网络容器的ID或者名称<br>    EndpointConfig：网络终端配置   </p>
<h2 id="将容器从网络断开"><a href="#将容器从网络断开" class="headerlink" title="将容器从网络断开"></a>将容器从网络断开</h2><p>POST /networks/{id}/disconnect<br>参数<br>    id：<br>    Container：<br>    Force：</p>
<h2 id="删除不用的网络"><a href="#删除不用的网络" class="headerlink" title="删除不用的网络"></a>删除不用的网络</h2><p>POST /networks/prune</p>

        </div>
        <div id="post-footer">
            <div class="avatar" >
                <img src="/img/author.jpg" alt="avatar"/>
                <!-- 
                <a href="javascript:void(0)" class="high-song">high起来 &#128541;</a>
                 -->
                
                <a href="http://backup-miabon.oss-cn-hongkong.aliyuncs.com/img/alipay.jpg" target="_blank" class="donate fa">打赏小弟 &#128536;</a>
                
            </div>
            <ul class="author-profile-section">
                <li>
                  
                  作者:
                  
                    
                    <a href="/about.html">MIAbon</a>
                </li>
                
                <li>发表日期: <span>2017-09-01  00:00:00</span></li>
                
                <li>最后编辑日期: <span>2017-11-23  08:23:00</span></li>
                
                <li class="post-category">
                    文章分类:
                    
                    <a href="/categories/docker/">docker</a>
                    
                </li>
                <li class="post-tags">
                    文章标签:
                    
                    <a href="/tags/linux/">linux</a>
                    
                    <a href="/tags/docker/">docker</a>
                    
                </li>
                
                <li> 版权声明: <a href="https://creativecommons.org/licenses/by-nc-nd/3.0/" target="_blank">
知识共享署名-非商业性使用-禁止演绎 3.0 未本地化版本许可协议（CC BY-NC-ND 3.0）
</a></li>
                
            </ul>
            <div id="donate-wrap">
                
                
                
                <img src="http://www.geasslinks.com/img/alipay.jpg" alt="支付宝付款" class="donate-img">
                
                
            </div>
        </div>
    </article>
    <div class="article-nav">
        
        <a href="/2017/09/01/docker文件共享/" class="pre-post fa fa-caret-left">docker容器文件共享</a>
        
        
        <a href="/2017/08/30/docker_swarm/" class="next-post fa">docker swarm</a>
        
    </div>
    
    <div id="comments">
        

<script>
  gitment.render(document.getElementById("comments"));
</script>



    </div>
    
</div>


    </div>
    <footer id="footer">
    
    <div class="social">
        
        <a href="https://www.example1.com" class="fa fa-free-code-camp" target="_blank" title="freecodecamp"></a>
        
        <a href="https://github.com/werewolf2101" class="fa fa-github" target="_blank" title="Follow me~"></a>
        
        <a href="mailto:werewolf2101@gmail.com" class="fa fa-email" target="_blank" title="Email"></a>
        
    </div>
    
    <div>
        
        <a href="/" class="copyright-links">MIAbon</a>&copy;2015 - 2018.All Rights
        Reserved.
    </div>
    <p>Powered by <a href="https://hexo.io" class="copyright-links" target="_blank">Hexo</a> | Theme by <a
                href="https://github.com/GeekaholicLin" class="copyright-links" target="_blank">GeekaholicLin</a>
    </p>
    
    
    <p>
        <span id="busuanzi_container_site_uv" class="fa fa-bar-chart">
        欢迎第<span id="busuanzi_value_site_uv"><i class="fa fa-spinner fa-spin"></i></span>位小伙伴~
        </span>
    </p>
    
</footer>

</div>
    <ul id="tools">
    <li class="totop-btn fa fa-angle-up"></li>
    <li class="exchange-btn fa fa-exchange"></li>
  
    <li class="toc-btn fa fa-list-ul"></li>
    
    

    
</ul>
<p id="process"></p>
<div id="search-overlay">
    <div class="search-area-wrap">
        <div id="search-area">
            <div class="input-wrap focus">
                <i class="fa fa-search" aria-hidden="true"></i>
                <input id="search-input" autofocus autocomplete="off" type="text"
                       placeholder="search this website..."/>
            </div>
            <ul id="search-result">
                <li class="load-first"><i class="fa fa-spinner fa-pulse"></i></li>
            </ul>
        </div>
    </div>
</div>

    <ol class="toc"><li class="toc-item toc-level-1"><a class="toc-link" href="#docker-server是否存活"><span class="toc-number">1.</span> <span class="toc-text">docker server是否存活</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#显示docker版本信息"><span class="toc-number">2.</span> <span class="toc-text">显示docker版本信息</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#显示系统信息"><span class="toc-number">3.</span> <span class="toc-text">显示系统信息</span></a></li><li class="toc-item toc-level-1"><a class="toc-link" href="#系统"><span class="toc-number">4.</span> <span class="toc-text">系统</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#显示数据使用信息"><span class="toc-number">4.1.</span> <span class="toc-text">显示数据使用信息</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#containers"><span class="toc-number">5.</span> <span class="toc-text">containers</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#列出容器"><span class="toc-number">5.1.</span> <span class="toc-text">列出容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#检查容器"><span class="toc-number">5.2.</span> <span class="toc-text">检查容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#创建容器"><span class="toc-number">5.3.</span> <span class="toc-text">创建容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#列出正在运行的容器里面的进程"><span class="toc-number">5.4.</span> <span class="toc-text">列出正在运行的容器里面的进程</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#获取一个容器的日志"><span class="toc-number">5.5.</span> <span class="toc-text">获取一个容器的日志</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#查看一个容器的改变"><span class="toc-number">5.6.</span> <span class="toc-text">查看一个容器的改变</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#导出一个容器为tar包"><span class="toc-number">5.7.</span> <span class="toc-text">导出一个容器为tar包</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#容器的状态"><span class="toc-number">5.8.</span> <span class="toc-text">容器的状态</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#调整容器的TTY"><span class="toc-number">5.9.</span> <span class="toc-text">调整容器的TTY</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#启动一个容器"><span class="toc-number">5.10.</span> <span class="toc-text">启动一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#停止一个容器"><span class="toc-number">5.11.</span> <span class="toc-text">停止一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#重启一个容器"><span class="toc-number">5.12.</span> <span class="toc-text">重启一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#kill一个容器"><span class="toc-number">5.13.</span> <span class="toc-text">kill一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#更改容器的配置选项"><span class="toc-number">5.14.</span> <span class="toc-text">更改容器的配置选项</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#重命名一个容器"><span class="toc-number">5.15.</span> <span class="toc-text">重命名一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#暂停一个容器"><span class="toc-number">5.16.</span> <span class="toc-text">暂停一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#恢复一个容器"><span class="toc-number">5.17.</span> <span class="toc-text">恢复一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#进入一个容器"><span class="toc-number">5.18.</span> <span class="toc-text">进入一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#通过websocket连接到容器"><span class="toc-number">5.19.</span> <span class="toc-text">通过websocket连接到容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#等待一个容器"><span class="toc-number">5.20.</span> <span class="toc-text">等待一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#移除一个容器"><span class="toc-number">5.21.</span> <span class="toc-text">移除一个容器</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#获取容器中的文件系统资源的存档"><span class="toc-number">5.22.</span> <span class="toc-text">获取容器中的文件系统资源的存档</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#将文件或文件夹的归档放到容器中的目录"><span class="toc-number">5.23.</span> <span class="toc-text">将文件或文件夹的归档放到容器中的目录</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#删除停止的容器"><span class="toc-number">5.24.</span> <span class="toc-text">删除停止的容器</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#镜像"><span class="toc-number">6.</span> <span class="toc-text">镜像</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#镜像列表"><span class="toc-number">6.1.</span> <span class="toc-text">镜像列表</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#构建一个镜像"><span class="toc-number">6.2.</span> <span class="toc-text">构建一个镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#删除构建缓存"><span class="toc-number">6.3.</span> <span class="toc-text">删除构建缓存</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#创建一个镜像"><span class="toc-number">6.4.</span> <span class="toc-text">创建一个镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#获取镜像的信息"><span class="toc-number">6.5.</span> <span class="toc-text">获取镜像的信息</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#获取一个镜像的历史"><span class="toc-number">6.6.</span> <span class="toc-text">获取一个镜像的历史</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#推送镜像"><span class="toc-number">6.7.</span> <span class="toc-text">推送镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#标记一个镜像"><span class="toc-number">6.8.</span> <span class="toc-text">标记一个镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#移除一个镜像"><span class="toc-number">6.9.</span> <span class="toc-text">移除一个镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#搜索镜像"><span class="toc-number">6.10.</span> <span class="toc-text">搜索镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#删除未使用的镜像"><span class="toc-number">6.11.</span> <span class="toc-text">删除未使用的镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#从容器创建新镜像"><span class="toc-number">6.12.</span> <span class="toc-text">从容器创建新镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#导出镜像"><span class="toc-number">6.13.</span> <span class="toc-text">导出镜像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#导出多个图像"><span class="toc-number">6.14.</span> <span class="toc-text">导出多个图像</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#导入镜像s"><span class="toc-number">6.15.</span> <span class="toc-text">导入镜像s</span></a></li></ol></li><li class="toc-item toc-level-1"><a class="toc-link" href="#网络"><span class="toc-number">7.</span> <span class="toc-text">网络</span></a><ol class="toc-child"><li class="toc-item toc-level-2"><a class="toc-link" href="#网络列表"><span class="toc-number">7.1.</span> <span class="toc-text">网络列表</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#网络信息"><span class="toc-number">7.2.</span> <span class="toc-text">网络信息</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#移除网络"><span class="toc-number">7.3.</span> <span class="toc-text">移除网络</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#创建网络"><span class="toc-number">7.4.</span> <span class="toc-text">创建网络</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#将容器连入网络"><span class="toc-number">7.5.</span> <span class="toc-text">将容器连入网络</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#将容器从网络断开"><span class="toc-number">7.6.</span> <span class="toc-text">将容器从网络断开</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#删除不用的网络"><span class="toc-number">7.7.</span> <span class="toc-text">删除不用的网络</span></a></li></ol></li></ol>


    <script src="/js/highsong.js"></script>



<script src="/js/search.js"></script>
<script type="text/javascript">
    //theme config datas
    var copyrightObj = {};
    copyrightObj.enable = 'true';
    copyrightObj.triggerCopyLength = '200';
    copyrightObj.appendText = '商业转载请联系作者获得授权,非商业转载请注明出处 © gasslinks.com';
    var leancloudObj = {};
    leancloudObj.enable = 'true';
    leancloudObj.className = 'blog';
    leancloudObj.limits = '5';
</script>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?dfebe5842f5d4196471b84802392a4b2";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>
<script type="text/javascript">
    var search = {};
    var search_path = "search.xml";
    if (!search_path) {
        search_path = "search.xml";
    }
    search.path = "/" + search_path;
    search.func =  _ajax.init();
</script>
<script src="/js/app.js"></script>


</body>
</html>